package com.sduept.nwld.dataserver.model.rota;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.PrePersist;
import javax.persistence.PreUpdate;
import javax.persistence.Table;

import com.sduept.generator.ObjectId;
/**
 * 值班去向
 *
 */
@Entity
@Table(name="t_rota_location")
public class RotaLocation implements Serializable,Cloneable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 7634655089284256108L;
	@Id
	@Column(length=50)
	private String id;
	
	@PrePersist
	public void init(){
		if(id == null || id.trim().length() == 0){
			id = ObjectId.get().toString();
		}
	}
	
	@PreUpdate
	public void preUpdate(){
		if(id == null || id.trim().length() == 0){
			id = ObjectId.get().toString();
		}
	}
	/**
	 * 值班人员名称
	 */
	private String personName;
	/**
	 * 值班人员ID
	 */
	private String personId;
	public String getPersonName() {
		return personName;
	}

	public void setPersonName(String personName) {
		this.personName = personName;
	}

	public String getPersonId() {
		return personId;
	}

	public void setPersonId(String personId) {
		this.personId = personId;
	}
	/**
	 * 节假日
	 */
	private Date holiday;
	
	public Date getHoliday() {
		return holiday;
	}

	public void setHoliday(Date holiday) {
		this.holiday = holiday;
	}
	/**
	 * 年份
	 */
	private int year;
	/**
	 * 重要备注
	 */
	private String remark;
	/**
	 * 重要备注
	 */
	private String location;
	
	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	
	public int getYear() {
		return year;
	}
	public void setYear(int year) {
		this.year = year;
	}

	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
}
